cmake_minimum_required(VERSION 3.14)
project(gstutorials)

set(CMAKE_CXX_STANDARD 11)

find_package(PkgConfig)

PKG_CHECK_MODULES(GTK3 REQUIRED gtk+-3.0)
# Setup CMake to use GTK+, tell the compiler where to look for headers
# and to the linker where to look for libraries
INCLUDE_DIRECTORIES(${GTK3_INCLUDE_DIRS})
LINK_DIRECTORIES(${GTK3_LIBRARY_DIRS})

# Add other flags to the compiler
ADD_DEFINITIONS(${GTK3_CFLAGS_OTHER})


#pkg_check_modules(GST REQUIRED gstreamer-1.0>=1.4)
pkg_check_modules(GSTREAMER REQUIRED gstreamer-1.0)
pkg_check_modules(GSTREAMER-APP REQUIRED gstreamer-app-1.0)
pkg_check_modules(GSTREAMER-AUDIO REQUIRED gstreamer-audio-1.0)
pkg_check_modules(GSTREAMER-PBUTILS REQUIRED gstreamer-pbutils-1.0)
pkg_check_modules(GSTREAMER-FFT REQUIRED gstreamer-fft-1.0)

include_directories(
        ${GLIB_INCLUDE_DIRS}
        includes
        ${GSTREAMER_INCLUDE_DIRS}
        ${GSTREAMER-APP_INCLUDE_DIRS}
        ${GSTREAMER-AUDIO_INCLUDE_DIRS}
        ${GSTREAMER-PBUTILS_INCLUDE_DIRS}
        ${GSTREAMER-FFT_INCLUDE_DIRS}
        ${CMAKE_CURRENT_SOURCE_DIR}
        /usr/include/gtk-2.0
        /usr/include/cairo
        /usr/include/pango-1.0
        /usr/lib/x86_64-linux-gnu/gtk-2.0/include
        /usr/include/gdk-pixbuf-2.0
        /usr/include/atk-1.0
)

link_directories(
        ${GLIB_LIBRARY_DIRS}
        ${GSTREAMER_LIBRARY_DIRS}
        ${GSTREAMER-APP_LIBRARY_DIRS}
        ${GSTREAMER-AUDIO_LIBRARY_DIRS}
        ${GSTREAMER-PBUTILS_LIBRARY_DIRS}
        ${GSTREAMER-FFT_LIBRARY_DIRS}
)

link_libraries(

        ${GSTREAMER_LIBRARIES}
        ${GSTREAMER-APP_LIBRARIES}
        ${GSTREAMER-AUDIO_LIBRARIES}
        ${GSTREAMER-PBUTILS_LIBRARIES}
        ${GSTREAMER-FFT_LIBRARIES}
        ${GTK3_LIBRARIES}


)


add_executable(gstutorials   mp4.cpp)